package com.ybkj.daijia.api.baidu;

/**
 * @author zhyu
 * @date 2019-08-14 15:48:30
 */
public interface BaiduApi {

    String AK = "LB3E26zmrStoTM2tUpPlqF9GTxp3lZbl";
//    String AK = "x3gVoXhGn24e7F7YPjGIjsG8RcUbRUNf";
//    String AK = "5vbcrkvXdjQ2Tf6NMyWh9IUiCMnwg63K";

    String PRE_COUNT_MILEAGE_AND_TIME =
        "https://api.map.baidu.com/routematrix/v2/driving?ak=" + AK +
            "&origins={origins}&destinations={destinations}&tactics=12&radius=2000&coord_type=bd09ll";


    String PRE_COUNT_MILEAGE =
        "https://api.map.baidu.com/routematrix/v2/driving?ak=" + AK +
            "&origins={origins}&destinations={destinations}&tactics=13&radius=2000&coord_type=bd09ll";

    //轨迹纠偏
    String PATH_DERECT = "http://api.map.baidu.com/rectify/v1/track";


    String AK_P = "ak";
    String POINT_LIST_P = "point_list";
    String SUPPLEMENT_MODE = "supplement_mode";
    String DRIVING = "driving";


    String STATUS = "status";

    String DISTANCE = "distance";

    int OK = 0;

    /***
     *
     * @param startLatitude
     * @param startLongitude
     * @param endLatitude
     * @param endLongitude
     * @return 单位米
     */
    public Long[] countMilleage(double startLatitude, double startLongitude, double endLatitude, double endLongitude);

    /***
     * 调用轨迹纠偏api
     * @param locsString [{"longitude":104.728979,"latitude":28.809058,"loc_time":1569233710,"coord_type_input":"bd09ll"}]
     * @return
     */
    Double getDistance(String locsString);
}
